import { defHttp } from '@/utils/http/axios'

enum Api {
  PublicKey = '/rsa/publicKey',
  Login = '/login',
  UserInfo = '/user/info',
}

export const getPublicKey = () => defHttp.get({ url: Api.PublicKey })
export const loginApi = (params: any) =>
  defHttp.post({ url: Api.Login, params }, { errorMessageMode: 'modal' })
export const getUserInfo = () => defHttp.get({ url: Api.UserInfo })
